Prevention of major depressive disorder (MDD) is a public health priority. Innovative strategies to identify those at-risk for MDD are in critical need to appropriately direct preventive care. Individuals with insomnia are >3 times more likely to develop depression than normal sleepers. Insomnia precedes ~50% of all incident and relapse depression cases. Thus, insomnia may serve as an entry point for preventing MDD. Our preliminary data not only show that insomnia treatment alleviates depressive symptoms, but may also reduce likelihood of future depression development, thereby identifying insomnia a viable target for depression prevention. Identification and treatment of insomnia typically occurs in primary care and is commonly treated with hypnotic medications. However, hypnotics have significant limitations, including residual impairment, injury due to falls and accidents, and abuse potential. Cognitive-behavioral therapy for insomnia (CBT-I) is recommended as first-line treatment for its safety advantages and superior treatment efficacy. Unfortunately, widespread implementation of CBT-I is severely limited by the national shortage of trained practitioners in clinical practice. Innovative stepped care approaches rooted in primary care hold potential to increase access to care, which may improve insomnia therapeutics and reduce rates of MDD by targeting a robust yet modifiable risk factor in insomnia. Our proposal uses digital CBT-I (dCBT-I) as a widely available first-line intervention to increase care access and reduce need for specialist resources. Our proposal also adds clinician-based face-to-face CBT-I only for treatment-resistant patients who need a more personalized and flexible approach from specialty care. We propose a large-scale stepped care clinical trial in the primary care setting that utilizes sequential, multiple assignment, randomized trial (SMART) design to determine the effectiveness of dCBT-I alone and in combination with face-to-face CBT-I for insomnia and the prevention of MDD. An important innovative component of the trial is the 1- and 2-year follow-up assessments to determine the durability of effectiveness over time and assess the impact on MDD incidence and relapse. Early risk-detection and prevention is especially critical in those at elevated risk for depression to reduce health disparities. Thus, individuals with elevated vulnerability to MDD (e.g., low socioeconomic status and racial minorities) will be included in significant numbers to test for potential moderation of treatment effects stratified by risk. Finally, dCBT-I and CBT-I have been shown to reduce rumination (negative repetitive thinking), which may help mitigate MDD development. As such, we will determine whether changes in rumination (a modifiable risk- factor and potential key therapy target) mediates the effects of our stepped care model on MDD prevention. This project will test a highly scalable model of sleep care in a large primary care system to determine the potential for wide dissemination and implementation to address the high volume of population need for safe and effective insomnia treatment and associated prevention of depression.